<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 <html>
    <head>
    	<meta charset="utf-8" />
        <title>输入金额DIY-bgy2014-11-22</title>
 <script src="js/jquery-3.1.1.js"></script>

  <script type="text/javascript">
      function check(v)
   {
    if(v.substring(0,1)==0 && v.length!=0)
    {
        $("#money").val("");
     alert("请正确输入金额！");
                    $("#money").focus();
    }
    else
    {
        //$("#money").focus();
    }
   }
        </script>
        <style type="text/css">
   .bg{width:100%;height:100%;background:#CCE8CF;}
   .ff{
 		width:150px;
 		height:50px;
 		font-size:36px;
 		color:#ff7f00;
 		font-weight:bold;
 		background-color:eeeeee ;
 		}
  </style>
    </head>
    <body class="bg">
        请输入金额：<input type="text" id="money" class="ff" onkeyup="this.value=this.value.replace(/[^\d]/g,'')" onblur="check(this.value)">元</input>
    </body>
</html>
